package com.cdtye.shuoh.config.gb28181.sip;

import com.cdtye.shuoh.config.gb28181.storage.IRedisCatchStorage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;


/**
 * 系统启动时控制设备
 */
@Component
@ConditionalOnProperty(value = "sip.enabled", havingValue = "true")
public class SipRunner implements CommandLineRunner {

    @Autowired
    private IRedisCatchStorage redisCatchStorage;


    @Override
    public void run(String... args) throws Exception {
        // 重置cseq计数
        redisCatchStorage.resetAllCSEQ();
    }
}
